package io.finer.erp.jeecg.finance.mapper;

import java.util.List;

import io.finer.erp.jeecg.finance.vo.FinaNvoiceSumPrice;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import io.finer.erp.jeecg.finance.entity.FinaNvoice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 发票表单
 * @Author: jeecg-boot
 * @Date:   2021-03-23
 * @Version: V1.0
 */
public interface FinaNvoiceMapper extends BaseMapper<FinaNvoice> {

    List<FinaNvoice> selectNvoiceByNoOrPrice(@Param("type") String type);

    List<FinaNvoice> getSumInvoice(@Param("type") String type,
                                   @Param("customerName")String customerName,
                                   @Param("startTime")String startTime,
                                   @Param("endTime")String endTime);
    
    /**
     * @Description 查询所有票号（用于筛选重复票号）
     * @return
     * Create at: 2021-06-10 16:20:27
     * @author: xzs
     * Revision:
     *    2021-06-10 16:20:27 - first revision by xzs
     *
     */
    @Select("SELECT invoice_no FROM fina_nvoice")
    List<String> selectAllNvoiceNo();
    
    
    List<FinaNvoice> getSumInvoiceAndCustomerId(@Param("startTime")String startTime, @Param("endTime")String endTime);

    List<FinaNvoice> getSumInvoiceAndSupplierId(@Param("startTime")String startTime, @Param("endTime")String endTime);
}
